home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
008a
/
bootm.zip
/
BOOTM.DOC
next >
Wrap
Text File
|
1991-10-14
|
9KB
|
197 lines
BOOTM.DOC - 10/14/91 by Dave Angel
Compuserve 75300,1166
usenet 75300.1166@COMPUSERVE.COM
References in this document to locations to other files give locations in terms
of Compuserve forum name and library. These files may be available elsewhere,
but I can't help there.
This boot system is a simple approach to having multiple Config.sys and
Autoexec.bat needs. There are several sophisticated approaches, but this one
is designed to be simple and versatile.
The simplest multi-boot method is to have pairs of config.sys and autoexec.bat
files. You have a batch file to copy one pair to the root directory, and
that's all. The problem with it is that these files have to be separately
maintained, and yet they're quite similar.
The most complete multi-boot system I've seen is BOOT14.ZIP in IBMSYS LIB1 by
Hans Salvisberg. This shareware allows you to select which boot setup you want
at boot time, which is a boon to those changing frequently. The problems are
that setting up the config.sys file is tricky and time consuming, and that your
system is then dependent on this driver.
What I wanted (for my own use only) was a system which could be easily
maintained with a plain-vanilla boot disk, using only a text editor in a pinch,
that didn't require me to duplicate more than a minimal part of my bootup setup
between multiple configurations. So I compromised, and came up with this
system. It has many limitations, but it's simple, free, and suits me fine. If
anyone else likes it, all I request is a electronic message saying so. And if
you're not on Compuserve or Usenet, go ahead and use it anyway.
Most of the boot-time complexity of my system is in the autoexec.bat file, not
in the config.sys file. And batch files already have branching capability. So
if the config.sys file could send parameters to the autoexec.bat, only the
former would have to be switched between configurations.
The principle is that you keep a set of two or more config.sys files in a
subdirectory on your hard disk. Each *.sys contains enough information to
determine both the .sys and the auto*.bat behavior at boot time. Therefore all
that's needed to switch boots is to copy one of these files on top of
Config.sys. That can be done with a 1-line batch file, or with a command
issued from a plain-vanilla floppy boot.
Included with this BOOTM.LZH is one program, called MAKEAUTO.EXE (with Turbo
Pascal source). This program can make a batch file out of selected remark
lines in Config.sys. All the rest of the package is contained in this DOC
file, from which you can cut and paste sample batch files, or just use the
ideas to design your own.
------------------------------------------------------------------------------
This package assumes you have at least MSDOS or PCDOS version 4, or whatever
the equivalent in DRDOS is. If you have an earlier DOS version, you'll get one
or more config.sys errors, as there was no REM command in earlier versions.
These errors are annoying, but harmless.
If your DOS is earlier than 3.3, you'll also have trouble with the CALL
statement. However, that's not necessary, and in fact I don't use CALL in my
own configurations.
If your DOS is earlier than 3.0, you'll have trouble throughout with the
examples, as they assume you can directly run a program or batch file in an
arbitrary directory.
------------------------------------------------------------------------------
Since there's no install program, I have to explain what the pieces are, and
how you might typically create them.
MAKEAUTO.EXE goes somewhere in your C: drive, perhaps in C:\STARTUP. Since you
typically use it long before you've set up a PATH, my examples are hard coded
to C:\STARTUP. It doesn't need to be in the PATH, since it's not much use
later in the session.
A directory is needed, which might be called C:\AUTOBAK. This directory will
contain multiple files of the form xxxxxxxx.SYS, where each configuration has
an 8 character name. It's also a good place to stash extra copies of
AUTOEXEC.BAT and AUTO2.BAT, just in case some nasty install program decides to
directly modify the ones in the root.
A single batch file is desirable, called perhaps NEWBOOT.BAT Following is an
example of what this might look like.
++++NEWBOOT.BAT
@echo off
rem Newboot %1 change to a new bootup configuration
if not exist C:\autobak\%1.sys goto error
COPY c:\autobak\%1.sys c:\config.sys >NULL
echo "%1" is new boot file. You can reboot now.
goto done
:error
echo To run, type NEWBOOT xxxx (no extension) where the xxxx is taken from
echo the following list:
DIR c:\autobak\*.sys | fgrep -x " sys "
:done
++++
This particular example is far more complex than it needs to be. Only the COPY
command itself is really needed. The example uses FGREP.ARC, which is
available in IBMAPP LIB1.
An autoexec.bat file is needed in the root, something like:
++++AUTOEXEC.BAT
@ECHO OFF
PROMPT $p$g
c:\bin\makeauto c:\config.sys c:\autobak\stuff$$$.bat
autobak\stuff$$$
++++
This will make a new batch file, and branch there.
Finally, two or more xxxxxxx.SYS files are needed in C:\AUTOBAK. Below are
possible examples of what these might look like:
++++NORMAL.SYS
REM NORMAL version of CONFIG.SYS
DOS=HIGH
device=e:\asm\flush\flush.sys Flushing the keyboard
DEVICE=C:\QEMM\QEMM386.SYS RAM EXCLUDE=A000-C7FF Frame=E000
FILES=40
STACKS=0,0
BUFFERS = 40
LASTDRIVE=M
DEVICE= C:\drivers\nansi.sys
DEVICE=c:\qemm\loadhi.sys /r:3 C:\drivers\burndev.sys H+
SHELL = C:\DOS\COMMAND.COM C:\DOS /P /E:500
REM $rem The lines like these will be copied to the temporary STUFF$$$.BAT
REM $rem which will be chained from AUTOEXEC.BAT
REM $c:\autobak\auto2 DOS5 EMS
++++
++++STRIPPED.SYS
REM STRIPPED version of CONFIG.SYS
FILES=40
STACKS=0,0
BUFFERS = 40
LASTDRIVE=M
SHELL = C:\DOS\COMMAND.COM C:\DOS /P /E:500
REM $rem The lines like these will be copied to the temporary STUFF$$$.BAT
REM $rem which will be chained from AUTOEXEC.BAT
REM $c:\autobak\auto2 DOS5 NOEMS
++++
These particular ones might be used to switch between a 386 configuration using
QEMM to get expanded memory and load lots of TSRs high, and a plain vanilla
configuration used for defragging.
The key feature here is the last line of each file, which invokes a batch file
called AUTO2.BAT in the \autobak directory, passing it two arguments.
Parts of sample \autobak\AUTO2.BAT
++++
echo My parms are %1 %2 %3 %4 %5 %6 %7 %8 %9
if not %1==WINDOWS goto nowindows
rem special stuff for Win3
path f:\win3;c:\binc;c:\bincexe;c:\bat;c:\bin;c:\dos;c:\tp;c:\rexxterm;d:\pctools
GOTO STEP3
:nowindows
if not %2==EMS goto STEP2
rem EMS stuff
path f:\win3;e:\c600\binb;e:\c600\bin;c:\binc;c:\bincexe;c:\bat;c:\bin;c:\dos;c:\tp;c:\rexxterm
if not %1 == DOS5 lh C:\startup\SUPERPCK /S:1200 /-B /T:4
c:\qemm\loadhi c:\startup\rxintmgr
c:\qemm\loadhi c:\STARTUP\ced.exe -S4,750 -B1000,1000,3000,1000,128,128 LOAD c:\STARTUP\ced.cfg
if %2==EMS c:\qemm\loadhi c:\STARTUP\hs.com /A30 /I2048 /X /b60000
if not %2==EMS c:\STARTUP\hs.com /A30 /I2048 /b10000
c:\qemm\loadhi c:\startup\rxrun c:\bincexe c:\bat /N50
c:\qemm\loadhi c:\dos\mirror c: d: e: f: /tc /td /te /tf
goto STEP3
:STEP2
etc. ...................
++++
------------------------------------------------------------------------------
How it works:
You run NEWBOOT NORMAL to copy C:\autobak\NORMAL.SYS into C:\CONFIG.SYS.
Then you reboot, once or several times. At boot time, this config.sys file
does its usual thing, but it ignores those lines beginning REM $.
Then AUTOEXEC.BAT gets control, and it runs MAKEAUTO. MAKEAUTO.EXE extracts
those REM $ lines from Config.sys and makes a new file STUFF$$$.BAT. Then
AUTOEXEC.BAT branches to this new file.
Depending on what's in these lines, there are lots of choices. In one extreme,
these lines (no limit to how many) could be the entire desired auto*.bat file.
At the other extreme, they could branch to a unique batch file, so that every
config file has a matching batch. My examples have each of these branch to a
common batch file, called AUTO2.BAT, but pass AUTO2.BAT varying parameters.
In AUTO2.BAT, these parameters are then used to customize what TSRs and other
stuff get run, and how. This way, the only thing that changes from one config
to another is the particular config.sys file.